//****************************************************
// Porman Project 2
// Filename: COcclusionQueryObject.h
// Date: 2009/09/21
// Author: KengYu Lin
// Modify:
//****************************************************
#ifndef _COCCLUSIONQUERYOBJECT_H
#define _COCCLUSIONQUERYOBJECT_H
#include "CBaseObject.h"

namespace Porman
{

namespace GL
{

class COcclusionQueryObject : public CBaseObject
{
    friend class CRenderDevice;
public:
    PGL_API virtual void setName( const char* pName ) { m_sName = std::string("QueObj_") + std::string( pName ); }

    PGL_API ERESULT beginQuery( void );
    PGL_API ERESULT endQuery( void );
    PGL_API bool queryResult( void );
    PGL_API int  getResult( void );

protected:
    COcclusionQueryObject( CRenderDevice* pDevice );
    virtual ~COcclusionQueryObject( void );

protected:
    unsigned int m_uiObjID;
};

}//End namespace GL

}//End namespace Porman

#endif